import Vue from 'vue';
import Router from 'vue-router';

// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}

Vue.use(Router);

export default new Router({
    //路由
    routes: [

        {
            path: "/",
            redirect: "/bigData",
        },
        {
            path: '/bigData',
            component: () =>
                import('../components/page/bigData2.0/mainBody.vue'),
            meta: {title: '大数据展示'}
        },

        {
            path: '/architectureForMp4',
            component: () =>
                import('../components/page/bigData2.0/child/architectureForMp4.vue'),
            meta: {title: '平台架构'}
        },

        //404
        {
            path: '*',
            redirect: '/404'
        },
        //500
        {
            path: '/500',
            component: () =>
                import('../components/page/500.vue'),
            meta: {title: '500'}
        },

    ]
});
